import request from '@/utils/request'

// 查询官网友情链接列表
export function listChain(query) {
  return request({
    url: '/official/chain/list',
    method: 'get',
    params: query
  })
}

// 查询官网友情链接详细
export function getChain(friendlyChainId) {
  return request({
    url: '/official/chain/' + friendlyChainId,
    method: 'get'
  })
}

// 新增官网友情链接
export function addChain(data) {
  return request({
    url: '/official/chain',
    method: 'post',
    data: data
  })
}

// 修改官网友情链接
export function updateChain(data) {
  return request({
    url: '/official/chain',
    method: 'put',
    data: data
  })
}

// 删除官网友情链接
export function delChain(friendlyChainId) {
  return request({
    url: '/official/chain/' + friendlyChainId,
    method: 'delete'
  })
}
